package com.oceansoft.mobile.common;

import java.util.Date;

import net.sf.json.JSONObject;

import com.oceansoft.mobile.weixin.entity.WX_User;


public class JavaTest {

	/**
	 * 用于测试一些api
	 * @param args
	 */
	public static void main(String[] args) {
//		test2();
		long t=1404537365358l;
		long t2=t-System.currentTimeMillis();
		System.out.println(new Date().getTime());
	}

	private static void test1() {
		String ss="白,白色,蓝,蓝色,粉,粉色,紫,紫色";
		String[] ary=ss.split(",");
		String s2="色";
		if(null!=ary){
			for(String a:ary){
				if(a.equals(s2)){
					System.out.println(true);
				}
			}
		}
	}
	
	private static void test2(){
		String json="{'nickname': 'Band', 'sex': 1}";
		WX_User stu = new WX_User();
        JSONObject obj = JSONObject.fromObject(json);
        stu = (WX_User)JSONObject.toBean(obj, WX_User.class);
        System.out.println(stu);
	}

}
